package com.guava;

import com.google.common.base.Splitter;

import java.util.Iterator;

/**
 * 描述:
 *
 * @author luzhongfu
 * Created by lucky on 2021-10-08 5:48 PM
 */
public class SplitterTest {

    private static final Splitter splitter = Splitter.on(",")
            .trimResults().omitEmptyStrings();

    public static void main(String[] args) {
        Iterable<String> split = splitter.split(",2,,4444,aaa,,");
        Iterator<String> iterator = split.iterator();
        while (iterator.hasNext()){
            System.out.print(iterator.next());
        }
    }
}
